package com.nulldev.util.net.packets;

import com.nulldev.util.logging.LoggerFactory;

public abstract class ClientPacket extends NetPacket{

	public ClientPacket(String packetName, String id, String data) {
		super(packetName, id, data, PacketType.CLIENT);
	}
	
	public ClientPacket(String packetName, String id) {
		this(packetName, id, "");
	}

	@Override
	public abstract void client(byte[] data, byte[] raw, final NetInfo client);

	@Override
	public void server(byte[] data, byte[] raw, final NetInfo connection) {
		LoggerFactory.getLogger(true, true).error("server() was called in a client packet, check your code.");
	}

}
